.class Lrexsee/core/browser/RexseePrompt$30;
.super Lrexsee/core/widget/Slider$OnSliderChangeListener;
.source "RexseePrompt.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lrexsee/core/browser/RexseePrompt;->showColor(Lrexsee/core/browser/clazz/PromptArgumentsSheet;Lrexsee/core/browser/RexseePrompt$OnPromptReturnListener;)V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Lrexsee/core/browser/RexseePrompt;

.field private final synthetic val$demo:Landroid/widget/ImageView;

.field private final synthetic val$hexValue:Landroid/widget/TextView;

.field private final synthetic val$rgbValue:Landroid/widget/TextView;


# direct methods
.method constructor <init>(Lrexsee/core/browser/RexseePrompt;Landroid/widget/TextView;Landroid/widget/TextView;Landroid/widget/ImageView;)V
    .locals 0

    .prologue
    .line 1
    iput-object p1, p0, Lrexsee/core/browser/RexseePrompt$30;->this$0:Lrexsee/core/browser/RexseePrompt;

    iput-object p2, p0, Lrexsee/core/browser/RexseePrompt$30;->val$rgbValue:Landroid/widget/TextView;

    iput-object p3, p0, Lrexsee/core/browser/RexseePrompt$30;->val$hexValue:Landroid/widget/TextView;

    iput-object p4, p0, Lrexsee/core/browser/RexseePrompt$30;->val$demo:Landroid/widget/ImageView;

    .line 605
    invoke-direct {p0}, Lrexsee/core/widget/Slider$OnSliderChangeListener;-><init>()V

    return-void
.end method


# virtual methods
.method public run(I)V
    .locals 9
    .param p1, "progress"    # I

    .prologue
    const/4 v8, 0x0

    const-string v7, ","

    .line 608
    mul-int/lit16 v4, p1, 0xff

    div-int/lit8 p1, v4, 0x64

    .line 609
    iget-object v4, p0, Lrexsee/core/browser/RexseePrompt$30;->val$rgbValue:Landroid/widget/TextView;

    invoke-virtual {v4}, Landroid/widget/TextView;->getText()Ljava/lang/CharSequence;

    move-result-object v4

    invoke-interface {v4}, Ljava/lang/CharSequence;->toString()Ljava/lang/String;

    move-result-object v4

    const-string v5, ","

    invoke-virtual {v4, v7}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;

    move-result-object v3

    .line 610
    .local v3, "rgb":[Ljava/lang/String;
    iget-object v4, p0, Lrexsee/core/browser/RexseePrompt$30;->val$rgbValue:Landroid/widget/TextView;

    new-instance v5, Ljava/lang/StringBuilder;

    aget-object v6, v3, v8

    invoke-static {v6}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v6

    invoke-direct {v5, v6}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v6, ","

    invoke-virtual {v5, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v5

    const-string v6, ","

    invoke-virtual {v5, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    const/4 v6, 0x2

    aget-object v6, v3, v6

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 611
    invoke-static {p1}, Ljava/lang/Integer;->toHexString(I)Ljava/lang/String;

    move-result-object v4

    invoke-static {v4}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v0

    .line 612
    .local v0, "green":Ljava/lang/String;
    invoke-virtual {v0}, Ljava/lang/String;->length()I

    move-result v4

    const/4 v5, 0x1

    if-ne v4, v5, :cond_0

    new-instance v4, Ljava/lang/StringBuilder;

    const-string v5, "0"

    invoke-direct {v4, v5}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v4, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    .line 613
    :cond_0
    iget-object v4, p0, Lrexsee/core/browser/RexseePrompt$30;->val$hexValue:Landroid/widget/TextView;

    invoke-virtual {v4}, Landroid/widget/TextView;->getText()Ljava/lang/CharSequence;

    move-result-object v4

    invoke-interface {v4}, Ljava/lang/CharSequence;->toString()Ljava/lang/String;

    move-result-object v2

    .line 614
    .local v2, "oHex":Ljava/lang/String;
    new-instance v4, Ljava/lang/StringBuilder;

    const/4 v5, 0x3

    invoke-virtual {v2, v8, v5}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v5

    invoke-static {v5}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v5

    invoke-direct {v4, v5}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v4, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    const/4 v5, 0x5

    invoke-virtual {v2, v5}, Ljava/lang/String;->substring(I)Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    .line 615
    .local v1, "hex":Ljava/lang/String;
    iget-object v4, p0, Lrexsee/core/browser/RexseePrompt$30;->val$hexValue:Landroid/widget/TextView;

    invoke-virtual {v4, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 616
    iget-object v4, p0, Lrexsee/core/browser/RexseePrompt$30;->val$demo:Landroid/widget/ImageView;

    new-instance v5, Landroid/graphics/drawable/ColorDrawable;

    invoke-static {v1}, Landroid/graphics/Color;->parseColor(Ljava/lang/String;)I

    move-result v6

    invoke-direct {v5, v6}, Landroid/graphics/drawable/ColorDrawable;-><init>(I)V

    invoke-virtual {v4, v5}, Landroid/widget/ImageView;->setImageDrawable(Landroid/graphics/drawable/Drawable;)V

    .line 617
    return-void
.end method
